<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{margin: 0;
        padding: 0;
        }
        a{
            text-decoration: none;
            color: #333;
            
        }
        ul li{
           display: inline-block; 
           height: 20px;
           width: 60px;
        }
        ul li a{
            display: block;
            text-align: center;
            background-color: #ccc;
        }
        .active{
            background-color: yellow;
        }
        .content{
         width: 188px;
         height: 200px;
         border: 1px solid #ccc;
        }
    </style>
    <script>
        window.onload = function(){
        var as = document.querySelectorAll("li a");
        for(var i=0;i< as.length;i++){
            as[i].onclick = function(){
                for(var j=0;j<as.length;j++){
                    as[j].className="";
                }
                this.className="active";
                
                //ajax
                var url = this.attributes["data-url"].value;
            }
        }
        }
    </script>
</head>
<body>
    <ul>
        <li><a href="#" class="active" data-url="http://a">列表1</a></li>
        <li><a href="#" data-url="http://b">列表2</a></li>
        <li><a href="#" data-url="http://c">列表3</a></li>
    </ul>
    <div class="content">
     
    </div>
</body>
</html>